package cn.huiyunche.base.service.enums;

/**
 * 运单接单类型 10:接单 20:派单
 *
 * @author Administrator
 */
public enum WaybillContactsTypeEnum {
    DRIVER(10, "司机"),
    DEPARTPERSON(20, "提车人信息"),
    RECEIPTPERSON(30, "交车人信息");

    private final int value;
    private final String text;

    WaybillContactsTypeEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static WaybillContactsTypeEnum getByValue(int value) {
        for (WaybillContactsTypeEnum temp : WaybillContactsTypeEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
